package com.codecrane.core.util;

/**
 * 获取货币符号
 */
public enum CountryMoneyEnum {
    US(1, "$"),
    UK(2, "£"),
    DE(3, "€"),
    FR(4, "€"),
    IT(5, "€"),
    ES(6, "€"),
    EU(7, "€"),
    JP(8, "¥"),
    CA(9, "$"),
    CN(10, "¥"),
    PKUS(13,"$"),
    PKUK(14,"£"),
    PKDE(15,"€");

    private int code;
    private String msg;

    CountryMoneyEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static String getCountry(int code) {
        for (CountryMoneyEnum countryEnum : CountryMoneyEnum.values()) {
            if (code == countryEnum.getCode()) {
                return countryEnum.getMsg();
            }
        }
        return "";
    }
}
